package com.xiamo.socket;
/**
 * 
 *
 * @author Richard - rui.wu@bitmain.com
 * @since 2016年7月21日 
 *
 */
public class EnumDemo {
	private static enum Command2 {
		/**
		 * 矿机MAC地址命令
		 */
		MAC("", 1 << 1),
		/**
		 * 矿机状态信息命令
		 */
		STATS("{\"command\":\"stats\"}", 1 << 2),
		/**
		 * 矿机汇总信息命令
		 */
		SUMMARY("{\"command\":\"summary\"}", 1 << 3),
		/**
		 * 矿机矿池配置信息命令
		 */
		POOLS("{\"command\":\"pools\"}", 1 << 4),
		/**
		 * 所有命令
		 */
		ALL("", 1 << 5);
		
		public int key;
		public String value;
		
		private Command2(String value, int key) {
			this.value = value;
			this.key = key;
		}
	}
	
	public static void main(String[] args) {
		System.out.println(Command2.STATS.name()+" "+Command2.STATS.key+" "+Command2.STATS.value);
		System.out.println(Command2.MAC.key+" "+Command2.MAC.value);
		System.out.println(Command2.STATS.key+" "+Command2.STATS.value);
		System.out.println(Command2.SUMMARY.key+" "+Command2.SUMMARY.value);
		System.out.println(Command2.POOLS.key+" "+Command2.POOLS.value);
		System.out.println(Command2.ALL.key+" "+Command2.ALL.value);
		
	}
}
